using System;
using FluentNHibernate;
using FluentNHibernate.Testing;
using NUnit.Framework;
using RMH.Entities;

namespace RMH.IntegrationTests.Repository
{
    [TestFixture]
    public class PatientRepositorySpecs : RepositoryBaseSpecs
    {
        [Test]
        public void can_persist_all_properties_of_patient()
        {
            
            new PersistenceSpecification<Patient>(GetSession())
                .CheckProperty(x => x.FirstName, "Optimus")
                .CheckProperty(x => x.LastName, "Prime")
                .CheckProperty(x => x.MiddleName, "Eugene")
                .CheckProperty(x => x.VehicleMake, "Ford")
                .CheckProperty(x => x.VehicleModel, "Fiesta")
                .CheckProperty(x => x.VehiclePlateNumber, "34834-34343")                
                .CheckProperty(x => x.PhoneNumber, "555-234-3433")
                .CheckProperty(x => x.PhoneNumberAlternate, "555-231-3433")
                .CheckProperty(x => x.VehiclePlateState, "PA")
                .CheckProperty(x => x.EmailAddress, "optimus@autobots.com")                                               
                .CheckProperty(x => x.DateOfBirth, new DateTime(1984, 1, 1))
                .CheckProperty(x => x.DateOfDeath, new DateTime(1989, 1, 1))                    
                .VerifyTheMappings();

        }

      

     
    }
}